<?
require_once ('../../models/Product.php');

	$response = Product::Insert($row);
	if($response === true)
		header("Location: index.php");

?>

<!DOCTYPE html>
<html lang="en">
	<? include('../../inc/head.php'); ?>
	<body>
		<div>
			<? include('../../inc/nav.php'); ?>

			<div id="content">
				
				<? if(isset($response)): ?>
					<dl class="dl-horizontal error">
						<? foreach ($response as $key => $value) { ?>
							<dt><?=$key?></dt>
							<dd><?=$value?></dd>
						<? } ?>						
					</dl>
				<? endif; ?>
				<form class="form-horizontal" action="" method="post">
					<div class="control-group">
						<label class="control-label">Id:</label>
						<div class="controls">
							<input type="text" name="idProduct" id="idProduct" />
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label" for="idProduct">Name:</label>
						<div class="controls">
							<input type="text" name="Product_Name" id="Product_Name" />
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">Description:</label>
						<div class="controls">
							<input type="text" name="Product_Description" />
						</div>
					</div>
				
					<div class="control-group">
						<label class="control-label">Price:</label>
						<div class="controls">
							<input type="text" name="Product_Price" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">Img:</label>
						<div class="controls">
							<input type="text" name="Product_Img" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">Category Id:</label>
						<div class="controls">
							<input type="text" name="Category_idCategory" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">Order_Details id:</label>
						<div class="controls">
							<input type="text" name="Order_Details_idOrder_Detais" />
						</div>
					</div>
					<div class="control-group">
						<div class="controls">
							<input type="submit" value="Save" class="btn btn-primary" />
						</div>
					</div>
			
				</form>

			</div>
			<? include('../../inc/footer.php'); ?>
		</div>
	</body>
</html>